<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <script type="text/javascript" th:src="@{/backend/scripts/jquery/jquery-1.7.1.js}"></script>
  <link th:href="@{/backend/style/authority/basic_layout.css}" rel="stylesheet" type="text/css">
  <link th:href="@{/backend/style/authority/common_style.css}" rel="stylesheet" type="text/css">
  <script type="text/javascript" th:src="@{/backend/scripts/authority/commonAll.js}"></script>
  <script type="text/javascript"
          th:src="@{/backend/scripts/fancybox/jquery.fancybox-1.3.4.js}"></script>
  <script type="text/javascript"
          th:src="@{/backend/scripts/fancybox/jquery.fancybox-1.3.4.pack.js}"></script>
  <link rel="stylesheet" type="text/css"
        th:href="@{/backend/style/authority/jquery.fancybox-1.3.4.css}" media="screen"/>
  <script type="text/javascript"
          th:src="@{/backend/scripts/artDialog/artDialog.js?skin=default}"></script>
  <title>课程管理</title>
  <style>
    .alt td {
      background: black !important;
    }
  </style>
  <script>
    function delLesson(id){
      console.info(id);
      var deleteTag = confirm("确认要删除？")
      if(deleteTag){
        $.ajax({
          type: "GET",
          url: "/free_study/backend/lesson_delete?id="+id,
          contentType: "application/json; charset=utf-8",
          success: function(obj){
            console.info(obj);
            if (obj.code == 0) {
              alert("删除成功");
              window.location.reload()
            } else {
              alert(obj.msg);
            }
          },
          error: function(){
            alert("系统异常！");
          }
        });
      }
    }
  </script>
</head>
<body>
<div class="" style="display: none; position: absolute;">
  <div class="aui_outer">
    <table class="aui_border">
      <tbody>
      <tr>
        <td class="aui_nw"></td>
        <td class="aui_n"></td>
        <td class="aui_ne"></td>
      </tr>
      <tr>
        <td class="aui_w"></td>
        <td class="aui_c">
          <div class="aui_inner">
            <table class="aui_dialog">
              <tbody>
              <tr>
                <td colspan="2" class="aui_header">
                  <div class="aui_titleBar">
                    <div class="aui_title" style="cursor: move; display: block;"></div>
                    <a class="aui_close" href="javascript:/*artDialog*/;"
                       style="display: block;">×</a></div>
                </td>
              </tr>
              <tr>
                <td class="aui_icon" style="display: none;">
                  <div class="aui_iconBg" style="background: none;"></div>
                </td>
                <td class="aui_main" style="width: auto; height: auto;">
                  <div class="aui_content" style="padding: 20px 25px;"></div>
                </td>
              </tr>
              <tr>
                <td colspan="2" class="aui_footer">
                  <div class="aui_buttons" style="display: none;"></div>
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </td>
        <td class="aui_e"></td>
      </tr>
      <tr>
        <td class="aui_sw"></td>
        <td class="aui_s"></td>
        <td class="aui_se" style="cursor: se-resize;"></td>
      </tr>
      </tbody>
    </table>
  </div>
</div>
<form id="submitForm" name="submitForm" action="" method="post">
  <input type="hidden" name="allIDCheck" value="" id="allIDCheck">
  <input type="hidden" name="fangyuanEntity.fyXqName" value="" id="fyXqName">
  <div id="container">
    <div class="ui_content">
      <div class="ui_text_indent">
        <div id="box_border">
          <div id="box_top">课程列表</div>
          <div id="box_bottom">
            <a th:href="@{/backend/lesson_doc}"><span>配置参考文档</span></a>
            <a th:href="@{/backend/lesson_create}" class="edit" style="margin-right: 10px">新增</a>
          </div>
        </div>
      </div>
    </div>
    <div class="ui_content">
      <div class="ui_tb">
        <table class="table" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
          <tbody>
          <tr style="background: rgb(255, 255, 255);">
            <th>id</th>
            <th>顺序</th>
            <th>名称</th>
            <th>标题</th>
            <th>创建日期</th>
            <th>修改日期</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          <tr style="background: rgb(255, 255, 255);" th:each="lessonVo : ${lessonVos}">
            <td style="color: rgb(144, 144, 144);" th:text="${lessonVo.id}"></td>
            <td style="color: rgb(144, 144, 144);" th:text="${lessonVo.order}"></td>
            <td style="color: rgb(144, 144, 144);" th:text="${lessonVo.name}"></td>
            <td style="color: rgb(144, 144, 144);" th:text="${lessonVo.title}"></td>
            <td style="color: rgb(144, 144, 144);" th:text="${lessonVo.create_time}"></td>
            <td style="color: rgb(144, 144, 144);" th:text="${lessonVo.update_time}"></td>
            <td style="color: rgb(144, 144, 144);" th:if="${lessonVo.status==0}">未发布</td>
            <td style="color: rgb(144, 144, 144);" th:if="${lessonVo.status==1}">已发布</td>
						<td>
							<a th:href="@{/backend/lesson_edit(id=${lessonVo.id})}" class="edit">编辑</a>
              <a th:onclick="'javascript:delLesson('+${lessonVo.id}+');'">删除</a>
              <a th:href="@{/backend/lesson_video_list(lesson_id=${lessonVo.id})}" class="edit">课程视频</a>
            </td>
          </tr>

          </tbody>
        </table>
      </div>
      <div class="ui_tb_h30">
        <div class="ui_flt" style="height: 30px; line-height: 30px;">
          共有
          <span class="ui_txt_bold04" th:text="${lessonVos.size()}"></span>
          条记录
        </div>
      </div>
    </div>
  </div>
</form>
<div style="display:none">
  <script src="http://v7.cnzz.com/stat.php?id=155540&amp;web_id=155540" language="JavaScript"
          charset="gb2312"></script>
  <script src="http://c.cnzz.com/core.php?web_id=155540&amp;t=z" charset="utf-8"
          type="text/javascript"></script>
  <a href="https://www.cnzz.com/stat/website.php?web_id=155540" target="_blank"
     title="站长统计">站长统计</a></div>


<div id="fancybox-tmp"></div>
<div id="fancybox-loading">
  <div></div>
</div>
<div id="fancybox-overlay"></div>
<div id="fancybox-wrap">
  <div id="fancybox-outer">
    <div class="fancybox-bg" id="fancybox-bg-n"></div>
    <div class="fancybox-bg" id="fancybox-bg-ne"></div>
    <div class="fancybox-bg" id="fancybox-bg-e"></div>
    <div class="fancybox-bg" id="fancybox-bg-se"></div>
    <div class="fancybox-bg" id="fancybox-bg-s"></div>
    <div class="fancybox-bg" id="fancybox-bg-sw"></div>
    <div class="fancybox-bg" id="fancybox-bg-w"></div>
    <div class="fancybox-bg" id="fancybox-bg-nw"></div>
    <div id="fancybox-content"></div>
    <a id="fancybox-close"></a>
    <div id="fancybox-title"></div>
    <a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a><a
      href="javascript:;" id="fancybox-right"><span class="fancy-ico"
                                                    id="fancybox-right-ico"></span></a></div>
</div>
</body>
</html>
